Component: TDataListBox Version: 1.0 Author: Stefan Wloch Date: 10/8/97 I required a ListBox which would associate a numeric value, not visible to the user, with each item in a listbox. I designed a component TDataListBox inherited from TListBox with a property 'DataItem' for each item in the listbox. To associate a numeric value with a TDataListBox item, simply use the following syntax: var i: Integer; begin i:=DataListBox1.Items.Add('Joe Bloggs'); DataListBox1.DataItem[i]:=1234; //1234 is now a property of 'Joe Bloggs' DataListBox item. end; The above two lines of code can be concatenated into one line of code: DataListBox1.DataItem[DataListBox1.Items.Add('Joe Bloggs')]:=1234; This component now enables me to list items in a list box associating each item with a numeric value. ---------------------------------------------------------------- Installation Delphi 1 & 2 Backup your 'cmplib32.dcl' file as a precaution. Select 'Component', 'Install'. Select 'Add', 'Browse'. Select the directory containing the TDataListBox files. Select 'DataListBox.PAS' and click OK on each box that appears. The TDataListBox component will be added to the 'Standard' page of your component toolbar. If anything goes wrong, restore your backed-up cmplib32.dcl and try again after correcting any obvious problems. ----------------------------------------------------------------- Installation Delphi 3 Select 'Component', 'Install Packages...'. Select 'Delphi User's Components' from the design package list and Edit the package by pressing the Edit button. Package editor will be invoked. Now add DataListBox.pas to the package and compile. The TDataListBox component will be added to the 'Standard' page of your component toolbar. ----------------------------------------------------------------- Demo Application Demo.exe is a quick and simple demo of the TDataListBox component. This component is FreeWare and may be used freely. Source code has been included. Enjoy, Stefan Wloch.